
/**
 * @Project : Clion_ProgrammingExercises
 * @File : 0035
 * @Author : WangRuoyu 
 * @Date : 2023/5/31 9:39
 */
#include "iostream"
#include "vector"

using namespace std;

class Solution {
public:
    int searchInsert(vector<int> &nums, int target) {
        int l = 0;
        int r = nums.size() - 1;
        while (l < r) {
            int mid = (l + r) / 2;
            if (nums[mid] >= target) r = mid;
            else l = mid + 1;
        }
        if (nums[l] < target) l++;
        return l;
    }
};


int main() {
    Solution sl;

    return 0;
}